package com.pccw.portlet.util.excel;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class ExcelStye {
	private HSSFCellStyle format_date;
	private HSSFCellStyle format_num;
	private String DATE_FORMAT_DATA  = "yyyy-mm-dd" ;
	//private String DATE_FORMAT_NUM  = "@";
	//private String DATE_FORMAT_NUM  =  "0.00000000_ " ;
	
	public ExcelStye(){
		
	}
	public ExcelStye(HSSFWorkbook workbook){
		this.format_date  =  workbook.createCellStyle();
		HSSFDataFormat format1  =  workbook.createDataFormat(); 
		this.format_date.setDataFormat(format1.getFormat(DATE_FORMAT_DATA)); 
		
		this.format_num  =  workbook.createCellStyle();
		HSSFDataFormat format2  =  workbook.createDataFormat(); 
		//this.format_num.setDataFormat(format2.getFormat(DATE_FORMAT_NUM));
		//this.format_num.setAlignment(HSSFCellStyle.ALIGN_RIGHT);
		this.format_num.setDataFormat(HSSFCellStyle.BORDER_NONE);
		//System.out.println(DATE_FORMAT_NUM);
	}

	public HSSFCellStyle getFormat_date() {
		return format_date;
	}

	public void setFormat_date(HSSFCellStyle format_date) {
		this.format_date = format_date;
	}

	public HSSFCellStyle getFormat_num() {
		return format_num;
	}

	public void setFormat_num(HSSFCellStyle format_num) {
		this.format_num = format_num;
	}
	
	
}
